import 'package:get/get.dart';

import '../../../common/models/ai/index.dart';

class AiState {
  // title
  final _title = "".obs;
  set title(String value) => _title.value = value;
  String get title => _title.value;


  final Rx<AIBaseConfig?> config = Rx<AIBaseConfig?>(null);
  final Rx<AIGenerateTypeInfo?> generateType = Rx<AIGenerateTypeInfo?>(null);

  // 会话列表
  final RxList<AIClueInfo> clueList = <AIClueInfo>[].obs;
  // 当前会话
  final Rx<AIClueInfo?> currentClue = Rx<AIClueInfo?>(null);
  // 当前会话的消息列表
  final RxList<AIChatInfo> chatInfoList = <AIChatInfo>[].obs;
  // 当前是否正在返回结果中
  final _aiResponsing = false.obs;
  set aiResponsing(bool value) => _aiResponsing.value = value;
  bool get aiResponsing => _aiResponsing.value;

  // 当前是否音频输入类型
  final _inputTypeVoice = false.obs;
  set inputTypeVoice(bool value) => _inputTypeVoice.value = value;
  bool get inputTypeVoice => _inputTypeVoice.value;
  
  // 是否支持语音转文字
  final _speechEnabled = false.obs;
  set speechEnabled(bool value) => _speechEnabled.value = value;
  bool get speechEnabled => _speechEnabled.value;

  // final Rx<OnnxModelStatus> speechStatus = Rx<OnnxModelStatus>(OnnxModelStatus.notInstall);
  
  // 上传附件列表
  RxMap<String, AIFileUploadItem> chatAttachmentList = <String, AIFileUploadItem>{}.obs;

    /// 是否大屏
  final _isBigScreen = false.obs;
  set isBigScreen(bool value) => _isBigScreen.value = value;
  bool get isBigScreen => _isBigScreen.value;

  final _screenWidth = (0.0).obs;
  set screenWidth(double value) => _screenWidth.value = value;
  double get screenWidth => _screenWidth.value;
  


}
